package com.qingshu.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qingshu.common.entity.sys.Permission;
import com.qingshu.mapper.PermissionMapper;
import com.qingshu.service.IPermissionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Huzz
 * @since 2021-10-11
 */
@Slf4j
@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission> implements IPermissionService {

    @Autowired
    private PermissionMapper permissionMapper;

    @Override
    public List<Permission> getLoginUserPermissionByRoleId(Set<Integer> roleIds) {

        return permissionMapper.getLoginUserPermissionByRoleId(roleIds);
    }

    @Override
    public List<Permission> selectListByPath(String requestUrl) {

        return permissionMapper.selectListByPath(requestUrl);
    }
}
